package cn.kuang.service;

import cn.kuang.mapper.RoleMapper;
import cn.kuang.pojo.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 徽州大都督
 * @date 2020/7/19
 */
@Transactional
@Service
public class RoleService {

    @Autowired
    private RoleMapper roleMapper;

    public List<Role> findAll() {

        return roleMapper.selectList (null);
    }

    public Role findById(Integer id){
        return roleMapper.selectById (id);
    }
}
